#!/bin/bash
echo "=== 修复所有路径问题 ==="

cd src

# 修复configmanager路径
echo "修复configmanager路径..."
find . -name "*.h" -o -name "*.cpp" | xargs sed -i 's|#include ".*configmanager_common/include/configmanager.h"|#include "configmanager.h"|g' 2>/dev/null

# 修复wxscintilla路径
echo "修复wxscintilla路径..."
find . -name "*.h" -o -name "*.cpp" | xargs sed -i 's|#include "wx/wxscintilla.h"|#include "wxscintilla.h"|g' 2>/dev/null

# 修复其他相对路径
echo "修复其他相对路径..."
find . -name "*.h" -o -name "*.cpp" | xargs sed -i 's|#include "\.\./sdk/|#include "../sdk/|g' 2>/dev/null
find . -name "*.h" -o -name "*.cpp" | xargs sed -i 's|#include "\.\./include/|#include "../include/|g' 2>/dev/null

echo "路径修复完成"
